package com.dailyblue.java.spring.ioc.demo5;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

@Controller
public class DemoD {
    @Autowired  // byType
    @Qualifier("db") // + byName
    private DemoB db;
    @Resource
    private DemoC dc;

    public void d() {
        System.out.println("DemoD`d");
        db.b();
        dc.c();
    }
}
